<template>
	<view class="main">
		<view class="module">
			<view class="module-title">采购管理</view>
			<view class="module-box">
				<u-grid :border="false" col="4">
					<!-- v-if="$auth.hasPermi(item.permi)" -->
					<u-grid-item  class="module-item"  v-for="item in list1" @click="toPage(item.path)">
						<image class="item-img" :src="item.icon"></image>
						<view class="module-item-name">{{item.name}}</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>

		<view class="module">
			<view class="module-title">加工生产</view>
			<view class="module-box">
				<u-grid :border="false" col="4">
					<u-grid-item class="module-item" v-for="item in list2" @click="toPage(item.path)">
						<image class="item-img" :src="item.icon"></image>
						<view class="module-item-name">{{item.name}}</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>

		<view class="module">
			<view class="module-title">成品入库</view>
			<view class="module-box">
				<u-grid :border="false" col="4">
					<u-grid-item class="module-item" v-for="item in list3" @click="toPage(item.path)">
						<image class="item-img" :src="item.icon"></image>
						<view class="module-item-name">{{item.name}}</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>

		<view class="module">
			<view class="module-title">其他</view>
			<view class="module-box">
				<u-grid :border="false" col="4">
					<u-grid-item class="module-item" v-for="item in list4" @click="toPage(item.path)">
						<image class="item-img" :src="item.icon"></image>
						<view class="module-item-name">{{item.name}}</view>
					</u-grid-item>
				</u-grid>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [{
					name: '订单分配',
					icon: require('@/static/funMoudel/icon-1.png'),
					path: '/pagesMain/purchase/orderHandOut/index',
					permi:'app:RqOfferFp:list'
				}, {
					name: '订单填报',
					icon: require('@/static/funMoudel/icon-2.png'),
					path: '/pagesMain/purchase/orderFilling/index',
					permi:'app:RqPurchaseOrder:export'
				}, {
					name: '订单审核',
					icon: require('@/static/funMoudel/icon-3.png'),
					path: '/pagesMain/purchase/orderAuditing/index',
					permi:'app:RqPurchaseOrderSh:list'
				}, {
					name: '订单货物分拣',
					icon: require('@/static/funMoudel/icon-4.png'),
					path: '/pagesMain/purchase/orderSorting/index',
					permi:'app:RqPurchaseOrderFp:list'
				}, {
					name: '退货单',
					icon: require('@/static/funMoudel/icon-5.png')
				}, {
					name: '投标审核',
					icon: require('@/static/funMoudel/icon-1-1.png'),
					path: '/pagesMain/purchase/bidsAuditing/index',
					permi:'app:RqOffer:query'
				}],
				list2: [{
					name: '扫码领料',
					icon: require('@/static/funMoudel/icon-6.png'),
					path: '/pagesMain/production/pickingScan/index',
					permi:'app:RqReceiveRecord:list'
				}, {
					name: '领料审核',
					icon: require('@/static/funMoudel/icon-7.png'),
					path: '/pagesMain/production/pickingAuditing/index',
					permi:'app:RqReceiveRecordSh:list'
				}, {
					name: '加工完成 申请',
					icon: require('@/static/funMoudel/icon-8.png'),
					path: '/pagesMain/production/completed/index',
					permi:'app:RqComplete:list'
				}, {
					name: '加工完成 审核',
					icon: require('@/static/funMoudel/icon-9.png'),
					path: '/pagesMain/production/completedAuditing/index',
					permi:'app:RqCompleteSh:list'
				}],
				list3: [{
					name: '入库申请单',
					icon: require('@/static/funMoudel/icon-10.png'),
					path: '/pagesMain/storage/stockinApply/index'
				}, {
					name: '打印承重/贴条',
					icon: require('@/static/funMoudel/icon-11.png'),
					path: '/pagesMain/storage/print/index'
				}, {
					name: '技术部化验',
					icon: require('@/static/funMoudel/icon-12.png'),
					path: '/pagesMain/storage/laboratory/index'
				}, {
					name: '入库审核',
					icon: require('@/static/funMoudel/icon-13.png'),
					path: '/pagesMain/storage/stockinAuditing/index'
				}],

				list4: [{
					name: '工作量',
					icon: require('@/static/funMoudel/icon-14.png'),
					path:'/pagesMain/other/workload/index'
				}, {
					name: '原料库存',
					icon: require('@/static/funMoudel/icon-15.png')
				}, {
					name: '原料入库',
					icon: require('@/static/funMoudel/icon-16.png')
				}, {
					name: '原料出库',
					icon: require('@/static/funMoudel/icon-17.png')
				}, {
					name: '成品库存',
					icon: require('@/static/funMoudel/icon-18.png')
				}, {
					name: '成品入库',
					icon: require('@/static/funMoudel/icon-19.png')
				}, {
					name: '成品出库',
					icon: require('@/static/funMoudel/icon-20.png')
				}],
			}
		},
		methods: {
			toPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background: #F9F9F9;
	}

	.main {
		padding: 20upx 24upx;
		padding-bottom: 260upx;
	}

	.module {
		background: #FFFFFF;
		border-radius: 16rpx;
		padding: 40upx 0upx;
		width: calc(100%);
		margin-bottom: 20upx;

		::v-deep .u-grid {
			align-items: flex-start;
		}
		::v-deep .u-grid-item{
			margin-top: 40rpx;
		}

		.module-title {
			font-family: PingFangSC, PingFang SC;
			font-weight: 600;
			font-size: 32rpx;
			color: #111111;
			padding: 0 30upx;
		}

		.module-box {
			padding: 0;
			width: calc(100%);
		}

		.module-item {
			// height: 100upx;
			// padding-top: 40upx;
		}

		.item-img {
			width: 90upx !important;
			height: 90upx !important;
			margin-bottom: 16upx;
		}

		image {
			width: 90upx !important;
			height: 90upx !important;
			margin-bottom: 16upx;
		}

		.module-item-name {
			text-align: center;
			width: 140upx;
			font-family: SourceHanSansCN, SourceHanSansCN;
			font-weight: 400;
			font-size: 28rpx;
			color: #666666;
		}
	}
</style>